ptrace: Introduce exception_ip arch hook
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Fri, 2 Feb 2024 12:30:26 +0000 (12:30 +0000)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 6 Mar 2025 06:21:29 +0000 (07:21 +0100)
commit52e9256eb50b7fecda3cbee530defb8c63394d4b
tree58147292fd492780c0594bd56317ed5b65dcadc7
parent3fc9d985063f3fe78db33f3fa63b56750ff6782c
ptrace: Introduce exception_ip arch hook

Origin: https://git.kernel.org/linus/11ba1728be3edb6928791f4c622f154ebe228ae6

On architectures with delay slot, architecture level instruction
pointer (or program counter) in pt_regs may differ from where
exception was triggered.

Introduce exception_ip hook to invoke architecture code and determine
actual instruction pointer to the exception.

Link: https://lore.kernel.org/lkml/00d1b813-c55f-4365-8d81-d70258e10b16@app.fastmail.com/
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name ptrace-Introduce-exception_ip-arch-hook.patch
arch/mips/include/asm/ptrace.h
arch/mips/kernel/ptrace.c
include/linux/ptrace.h